import { App } from "vue";
import { registerEditorProvider } from "@ibiz-template/runtime";
import { DatePickerEditorProvider } from "./i-ibz-date-picker.provider";
import DatePicker from "./i-biz-date-picker.vue";

export const IBizDatePicker = {
  install(v: App) {
    v.component("IBizDatePicker", DatePicker);
    // 日期选择器
    const datePickerProvider = new DatePickerEditorProvider();
    registerEditorProvider("MOBDATE", () => datePickerProvider);
    registerEditorProvider("MOBDATE_HOUR", () => datePickerProvider);
    registerEditorProvider("MOBDATE_MINUTE", () => datePickerProvider);
    registerEditorProvider("MOBDATE_NODAY", () => datePickerProvider);
    registerEditorProvider("MOBDATE_NODAY_NOSECOND", () => datePickerProvider);
    registerEditorProvider("MOBDATE_NOTIME", () => datePickerProvider);
    registerEditorProvider("MOBDATE_SECOND", () => datePickerProvider);
  },
};
